<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
	"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>校园宿舍管理系统</title>
<link href="${path }/css/style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<center>
<table class="out">
<tr>
    <td class="title">校园宿舍管理系统</td>   	
</tr>
<tr>
    <td class="subtitle">&nbsp;</td>
</tr>
<tr>
    <td class="content">
    <table class="out">
    <tr>
      	<td class="left" >
        	<%@ include file="left.jsp"%>
     	</td>
     	
      	<td class="right">
      	<table class="rightTable"> 
        <tr>
          	<td class="mainMenu">学生缺寝记录</td>
        </tr>
        <tr>
          	<td class="navi"> 
               	功能导航： 
               	<a href="preSaveLog.do">添加缺寝记录</a> 
          	</td>
        </tr>
        <tr>
            <td class="rightout">
            <table class="fullTable" >
            <tr class="dataTitleTr">
                <th>日期</th>
                <th>姓名</th>
                <th>性别</th>
                <th>班级</th>
                <th>备注</th>
                <th>管理员</th>
                <th>操作</th>
            </tr>
            <c:forEach items="${stuLogList }" var="stuLog">
            <c:set var="student" value="${stuLog.student }" />
            <c:set var="teacher" value="${stuLog.teacher }"/>
          	<tr class="dataTr">
          		<td>${stuLog.logDate}</td>
              	<td>${student.name}</td>
              	<td>${student.sex}</td>
              	<td>${student.major}</td>
              	<td>${stuLog.remark}</td>
              	<td>${teacher.name}</td>
              	<td><a href="${path }/admin/deleteLog.do?id=${stuLog.id}"
              			onclick="return confirm('确定要删除该记录吗？')" >删除</a>             		
              	</td>
          	</tr>
            </c:forEach>      
            </table>
            </td>
          </tr>
          </table>
          </td>
      </tr>
      </table></td>
    </tr>
<tr>
    <td class="bottom">&nbsp;</td>
</tr>
</table>
</center>
</body>
</html>